package com.boboPlanet.user.config;

import com.boboPlanet.user.filter.RequestContextHystrixConcurrencyStrategy;
import com.netflix.hystrix.strategy.HystrixPlugins;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @Description: TODO 解决feign调用时MDC获取不到问题
 * @Author: mis_wu
 * @Date: 2023/5/7
 * @Company xxx
 **/
@Configuration
public class HystrixCircuitBreakerConfiguration {

    @PostConstruct
    public void init() {
        HystrixPlugins.getInstance().registerConcurrencyStrategy(
                new RequestContextHystrixConcurrencyStrategy());
    }

}